home *** CD-ROM | disk | FTP | other *** search
-
-
-
- ddddkkkkssss((((7777MMMM)))) ddddkkkkssss((((7777MMMM))))
-
-
-
- NNNNAAAAMMMMEEEE
- dks - dksc (SCSI) disk driver
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ////ddddeeeevvvv////ddddsssskkkk////ddddkkkkssss****
- ////ddddeeeevvvv////rrrrddddsssskkkk////ddddkkkkssss****
- ////ddddeeeevvvv////ddddsssskkkk////_n_o_d_e_n_a_m_e////lllluuuunnnn****////cccc****pppp****
- ////ddddeeeevvvv////rrrrddddsssskkkk////_n_o_d_e_n_a_m_e////lllluuuunnnn****////cccc****pppp****
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- The ddddkkkksssscccc driver supports all disk types that use a SCSI command set.
- This includes traditional parallel SCSI as well as Fibre Channel
- Arbitrated Loop and Fibre Channel Fabric devices (devices connected
- through a Fibre Channel switch). Currently, 8 bit parallel SCSI (also
- called narrow SCSI) allows up to seven SCSI drives attached per SCSI bus,
- 16 bit parallel SCSI (also called wide SCSI) allows 15 drives. Fibre
- Channel Arbitrated Loop (FC-AL) allows up to 125 drives (some
- implementations limit the number to 110). The maximum number addressable
- through Fibre Channel Fabric has no theoretical limit. However,
- practical considerations do limit the number to 252 drives for current
- adapters. Each drive (a RAID controller is considered a "drive" for
- these purposes) can support a number of logical units (luns). The
- current limit depends on the host adapter. It varies from 8 to 255.
- Each unit (or lun) can have up to 16 partitions in use, three of which
- (8, 9, and 10) are special (see below).
-
- Disk devices are named according to the following formats (jaguar drives
- are no longer supported):
-
- PPPPaaaarrrraaaalllllllleeeellll SSSSCCCCSSSSIIII aaaannnndddd FFFFCCCC----AAAALLLL
-
- ////ddddeeeevvvv////rrrrddddsssskkkk////ddddkkkkssss_c_o_n_t_r_o_l_l_e_r#dddd_d_r_i_v_e#{ssss_p_a_r_t_i_t_i_o_n#|vvvvhhhh|vvvvoooollll}
- ////ddddeeeevvvv////rrrrddddsssskkkk////ddddkkkkssss_c_o_n_t_r_o_l_l_e_r#dddd_d_r_i_v_e#llll_l_u_n#{ssss_p_a_r_t_i_t_i_o_n#|vvvvhhhh|vvvvoooollll}
- ////ddddeeeevvvv////ddddsssskkkk////ddddkkkkssss_c_o_n_t_r_o_l_l_e_r#dddd_d_r_i_v_e#{ssss_p_a_r_t_i_t_i_o_n#|vvvvoooollll}
- ////ddddeeeevvvv////ddddsssskkkk////ddddkkkkssss_c_o_n_t_r_o_l_l_e_r#dddd_d_r_i_v_e#llll_l_u_n#{ssss_p_a_r_t_i_t_i_o_n#|vvvvoooollll}
-
-
- FFFFiiiibbbbrrrreeee CCCChhhhaaaannnnnnnneeeellll FFFFaaaabbbbrrrriiiicccc
-
- ////ddddeeeevvvv////rrrrddddsssskkkk////_n_o_d_e_n_a_m_e////lllluuuunnnn_l_u_n#{ssss_p_a_r_t_i_t_i_o_n#|vvvvhhhh|vvvvoooollll}////cccc_c_o_n_t_r_o_l_l_e_r#pppp_p_o_r_t#
- ////ddddeeeevvvv////ddddsssskkkk////_n_o_d_e_n_a_m_e////lllluuuunnnn_l_u_n#ssss_p_a_r_t_i_t_i_o_n#////cccc_c_o_n_t_r_o_l_l_e_r#pppp_p_o_r_t#
-
- Note that the Fabric device names always specify the _l_u_n#, even if it is
- zero. The rrrrddddsssskkkk devices use a raw interface to communicate with the disk,
- while the ddddsssskkkk devices use a block interface. The _c_o_n_t_r_o_l_l_e_r#, _d_r_i_v_e#,
- and _l_u_n# are used to indicate SCSI controller number, target ID, and
- logical unit number, respectively. The _n_o_d_e_n_a_m_e and _p_o_r_t# are used to
- indicate the Fibre Channel world wide name (WWN) and the device port
- number (normal Fibre Channel disks have two ports). ssss_p_a_r_t_i_t_i_o_n#, vvvvhhhh, and
- vvvvoooollll indicate a partition of the disk. The vvvvhhhh device is only found in the
- rrrrddddsssskkkk directory, since it is normally used only for iiiiooooccccttttllll and raw access.
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- ddddkkkkssss((((7777MMMM)))) ddddkkkkssss((((7777MMMM))))
-
-
-
- The standard partition allocation by Silicon Graphics has _r_o_o_t on
- partition 0, _s_w_a_p on partition 1, and (optionally) /_u_s_r on partition 6.
- Some systems, such as the Indy, are shipped from the factory with a
- single filesystem on the system disk for ease of administration. In this
- case, partition 6 is not used. Partition 7 (when present), normally maps
- the entire _u_s_a_b_l_e portion of the disk (excluding the volume header).
- Partition 8 (vvvvhhhh) maps the volume header (see _p_r_t_v_t_o_c(1M), _d_v_h_t_o_o_l(1M)).
- Partition 10 (vvvvoooollll) maps the entire drive. Partition 9 is reserved, but
- is not used for disks with the ddddkkkksssscccc driver.
-
- In current releases, these devices are part of the hardware graph
- hwgfs(4), and are created dynamically as the disk partitions are changed.
- Therefore MMMMAAAAKKKKEEEEDDDDEEEEVVVV no longer needs to be run, nor does it need to be
- modified to create additional partition devices. The partitions will be
- created/updated whenever a disk is opened, such as when a filesystem is
- mounted, or when programs such as ffffxxxx((((1111MMMM)))) and pppprrrrttttvvvvttttoooocccc((((1111MMMM)))) access the disk.
- For devices that are hot-plugged, the bus that they are plugged into must
- be reprobed and reconfigured (see ssssccccssssiiiihhhhaaaa((((1111mmmm)))) and iiiiooooccccoooonnnnffffiiiigggg((((1111MMMM))))) in order
- for the partitions to be created.
-
- For removable media devices, mmmmeeeeddddiiiiaaaadddd((((1111MMMM)))), if running, will cause these
- updates to occur after media changes. In the absence of mediad, the user
- will need to run code or execute commands that will cause an open against
- the volume header. ffffxxxx((((1111MMMM)))) or pppprrrrttttvvvvttttoooocccc((((1111MMMM)))) are two examples of commands
- that will do this, as well as the DDDDIIIIOOOOCCCCGGGGEEEETTTTVVVVHHHH iiiiooooccccttttllll (see below) issued by a
- program.
-
- The standard configuration has /_d_e_v/_r_o_o_t linked to partition 0 of the
- system disk, with /_d_e_v/_s_w_a_p linked to partition 1 of the system disk, and
- /_d_e_v/_u_s_r linked to partition 6 of the system disk. Systems that do not
- use partition 6 as shipped, instead using just the s0 and s1 partitions,
- still have a link made. There is no attempt to make the link to the
- device used for the ////uuuussssrrrr filesystem in the _f_s_t_a_b(4) file, if present,
- even if it uses a different device. Option disks normally use the s7
- partition as a single filesystem, containing the whole usable portion of
- the disk.
-
- IIIIOOOOCCCCTTTTLLLL FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNNSSSS
- As well as normal read and write operations, the driver supports a number
- of special _i_o_c_t_l(2) operations when opened via the character special file
- in /_d_e_v/_r_d_s_k. Command values for these are defined in the system include
- file <_s_y_s/_d_k_i_o._h>, with data structures in <_s_y_s/_d_k_s_c._h>.
- These _i_o_c_t_l operations are intended for the use of special-purpose disk
- utilities. Many of them can have drastic or even fatal effects on disk
- operation if misused; they should be invoked only by the knowledgeable
- and with extreme caution!
-
- A list of the _i_o_c_t_l commands supported by the _d_k_s driver is given below.
-
- DIOCADDBB
- Adds a block to the badblock list. The argument is the logical
- block number (not a pointer) on the drive. For some makes of
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- ddddkkkkssss((((7777MMMM)))) ddddkkkkssss((((7777MMMM))))
-
-
-
- drives, the spared block must be written before the sparing takes
- effect. Only programs running with superuser permissions can use
- this ioctl.
-
- DIOCDRIVETYPE
- The first SSSSCCCCSSSSIIII____DDDDEEEEVVVVIIIICCCCEEEE____NNNNAAAAMMMMEEEE____SSSSIIIIZZZZEEEE bytes (currently 28) of the SCSI
- inquiry data for the drive is returned to the caller. The argument
- is a pointer to a char array of at least this size. This contains
- vendor and drive specific information such as the drive name and
- model number. See a SCSI command specification for details on the
- structure of this buffer.
-
- DIOCFORMAT
- Formats the entire drive. Any information on the drive is lost.
- The grown defect list (blocks spared with DIOCADDBB) is empty after
- formatting is complete, blocks previously in the grown defect list
- are no longer spared.
-
- DIOCGETVH
- Reads the disk volume header from the driver into a buffer in the
- calling program. The argument in the ioctl call must point to a
- buffer of size at least 512 bytes. The structure of the volume
- header is defined in the include file <_s_y_s/_d_v_h._h>. The
- corresponding call DIOCSETVH sets the drivers idea of the volume
- header; in particular, the drivers idea of the partition sizes and
- offsets is changed.
-
- DIOCPREVREM
- Issues a PREVENT ALLOW MEDIA REMOVAL command to the opened device.
- The first bit of the arg is or'd into byte 4 of the SCSI command.
- See a SCSI command specification for details on this command.
-
- DIOCRDEFECTS
- The argument is a pointer to a struct dk_ioctl_data. The i_addr
- field points to a structure like:
-
-
- structure defect_list {
- struct defect_header defhdr;
- struct defect_entry defentry[NENTS];
- };
-
- The i_len field is set to the total length of the structure, which
- must be less than NBPP from <_s_y_s/_p_a_r_a_m._h>; at most NENTS defects are
- returned. The actual number of defects can be determined by
- examining the defhdr.defect_listlen value, which is the number of
- bytes returned. This must be divided by the size of the applicable
- data structure for the type requested. The i_page field should be
- set to the bits identifying the badblock reporting type. These bits
- request the combination of manufacturer's and grown defects; and one
- of bytes from index, physical cyl/head/sec, vendor unique. The only
- combination that works with all currently supported SCSI disks is
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-
-
-
- ddddkkkkssss((((7777MMMM)))) ddddkkkkssss((((7777MMMM))))
-
-
-
- type cyl/head/sec; and either combined manufacturer's and grown
- defects, or just manufacturer's defects.
-
- DIOCREADCAPACITY
- The arg is a pointer to an unsigned integer. The value returned is
- the number of usable sectors on the drive (as read from the drive).
-
- DIOCSCSIINQ
- The arg is a pointer to a char array at least SCSI_INQUIRY_LEN bytes
- long. The SCSI inquiry data from the device is copied to this
- buffer. See a SCSI command specification for details on the
- structure of this buffer.
-
- DIOCSENSE / DIOCSELECT
- The argument is a pointer to a struct dk_ioctl_data. This allows
- sending SELECT and SENSE commands to the drive. See the ANSI SCSI
- specification and individual manufacturer's manuals for allowed page
- numbers and valid values. Only programs running with superuser
- permissions can use the DIOCSELECT ioctl.
-
- DIOCSTARTSTOP
- This command issues a SCSI STARTSTOP command to the opened device.
- The first two bits of the arg are or'd into byte 4 of the SCSI
- command. See a SCSI command specification for details on this
- command.
-
- DIOCTEST
- issues the SCSI "Send Diagnostic" command to the drive. The exact
- tests done are manufacturer specific. The _i_o_c_t_l call returns 0 upon
- success, or sets _e_r_r_n_o to EIO and returns -1 upon failure.
-
- NNNNOOOOTTTTEEEESSSS
- Fibre Channel fabric device names are meant to separate three concepts;
- device specification, portion of device, and path to device. Thus the
- _n_o_d_e_n_a_m_e specifies a unique device, such as a disk drive or a RAID
- controller. The _l_u_n# and _p_a_r_t_i_t_i_o_n# specify which portion of the disk or
- RAID is accesses, and the _c_o_n_t_r_o_l_l_e_r# and _p_o_r_t# specify the path the data
- and commands travel to and from the device. The port number will usually
- be something that represents the difference between the 64 bit world wide
- node name and the 64 bit world wide port name. For non-SGI devices, and
- some SGI devices that were released after a given release of IRIX, the
- driver may not be able to determine a short port number. In such cases,
- the port number will be the 64 bit world wide port name.
-
- FFFFIIIILLLLEEEESSSS
- /dev/dsk/dks*
- /dev/rdsk/dks*
- /dev/dsk/*/lun*/c*p*
- /dev/rdsk/*/lun*/c*p*
- /dev/root
- /dev/usr
- /dev/swap
-
-
-
- PPPPaaaaggggeeee 4444
-
-
-
-
-
-
- ddddkkkkssss((((7777MMMM)))) ddddkkkkssss((((7777MMMM))))
-
-
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- dvhtool(1M), fx(1M), prtvtoc(1M), scsiha(1M), ioconfig(1M).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 5555
-
-
-
-